<%@ page language="java" import="java.util.*,entity.*,service.impl.*,service.*" contentType="text/html; charset=utf-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<%  

String path = request.getContextPath();  

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  

%>  
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>icontest 主页</title>
		<!--
        	作者：1107485571@qq.com
        	时间：2018-07-07
        	描述：引用bootstrap样式和js
        	版本说明：bootstrap 3.3.7   jquery3.3.1
        -->
		<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
		<script src="js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		
		<!--
        	作者：1107485571@qq.com
        	时间：2018-07-07
        	描述：引用额外的图标库
        -->
        <link rel="stylesheet" href="css/iconfont.css" />
        
        <!--
        	作者：1107485571@qq.com
        	时间：2018-07-07
        	描述：主页的css样式
        -->
        <link rel="stylesheet" type="text/css" href="css/index.css"/>
        <link rel="stylesheet" type="text/css" href="css/header.css"/>
	</head>
	<body>
		<%@ include file="header.jsp" %>
		<%@ include file="slide.jsp" %>		
		
		<div class="container">
			<div class="row clearfix">
					<div class="col-md-12 column">
						<div class="push" id="push1">
							<span id="push1_title">推荐竞赛</span>
							<ul>
								<li>
									<a class="links" href="contest.jsp?currentPage=1&pageSize=10&typeName=数学建模">数学建模</a>
								</li>
								<li>
									<a class="links" href="contest.jsp?currentPage=1&pageSize=10&typeName=程序设计">程序设计</a>
								</li>
								<li>
									<a class="links" href="contest.jsp?currentPage=1&pageSize=10&typeName=土木建筑">土木建筑</a>
								</li>
								<li>
									<a class="links" href="contest.jsp?currentPage=1&pageSize=10&typeName=工业&创意设计">工业&创意设计</a>
								</li>
								<li>
									<a class="links" href="contest.jsp?currentPage=1&pageSize=10&typeName=电子&自动化">电子&自动化</a>
								</li>
								<li>
									<a class="links" href="contest.jsp?currentPage=1&pageSize=10&typeName=外语">外语</a>
								</li>
							</ul>
							<span id="push1_text">共<span id="push1_num">16678</span>个竞赛<a href="contest.jsp">查看全部竞赛</a></span>
						</div>
						<div class="row clearfix">
							<div class="col-md-3 column">
								<div class="contest_card contest_card1">
									<img class="imgs" src=""/>
									<div class="contest_text">
										<div class="sponsor">
											<span>主办方:</span>
											<span class="sponsor_name"></span>
										</div>
										<ul class="list-inline" id="smallIcon">
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-liulanrenshu">
													</span>
													<span class="likes"></span>
												</a>
											</li>
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-favorite_diss">
													</span>
													<span class="favs"></span>
												</a>
											</li>
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-pinglun">
													</span>
													<span class="pings"></span>
												</a>
											</li>
										</ul>
									</div>
								</div>
							</div>
							<div class="col-md-3 column">
								<div class="contest_card contest_card1">
									<img class="imgs" src=""/>
									<div class="contest_text">
										<div class="sponsor">
											<span>主办方:</span>
											<span class="sponsor_name"></span>
										</div>
										<ul class="list-inline" id="smallIcon">
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-liulanrenshu">
													</span>
													<span class="likes"></span>
												</a>
											</li>
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-favorite_diss">
													</span>
													<span class="favs"></span>
												</a>
											</li>
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-pinglun">
													</span>
													<span class="pings"></span>
												</a>
											</li>
										</ul>
									</div>
								</div>
							</div>
							<div class="col-md-3 column">
								<div class="contest_card contest_card1">
									<img class="imgs" src=""/>
									<div class="contest_text">
										<div class="sponsor">
											<span>主办方:</span>
											<span class="sponsor_name"></span>
										</div>
										<ul class="list-inline" id="smallIcon">
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-liulanrenshu">
													</span>
													<span class="likes"></span>
												</a>
											</li>
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-favorite_diss">
													</span>
													<span class="favs"></span>
												</a>
											</li>
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-pinglun">
													</span>
													<span class="pings"></span>
												</a>
											</li>
										</ul>
									</div>
								</div>
							</div>
							<div class="col-md-3 column">
								<div class="contest_card contest_card1">
									<img class="imgs" src=""/>
									<div class="contest_text">
										<div class="sponsor">
											<span>主办方:</span>
											<span class="sponsor_name"></span>
										</div>
										<ul class="list-inline" id="smallIcon">
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-liulanrenshu">
													</span>
													<span class="likes"></span>
												</a>
											</li>
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-favorite_diss">
													</span>
													<span class="favs"></span>
												</a>
											</li>
											<li>
												<a href="#" style="color: darkgrey;">
													<span class="iconfont icon-pinglun">
													</span>
													<span class="pings"></span>
												</a>
											</li>
										</ul>
									</div>
								</div>
							</div>
						</div>
						<div class="row clearfix">
							<div class="col-md-12 column">
								<div class="push" id="push2">
									<span id="push2_title">推荐活动</span>
									<ul>
										<li>本省考试</li>
										<li>本</li>
										<li>土木建筑</li>
										<li>工业&创意设计</li>
										<li>电子&自动化</li>
										<li>外语</li>
									</ul>
									<span id="push2_text">共<span id="push2_num">1978</span>个活动<a href="#">查看全部活动</a></span>
								</div>
								<div class="row clearfix">
									<div class="col-md-3 column">
										<div class="contest_card">
											<img src="img/activity1.jpg"/>
											<div class="contest_text">
												<div class="sponsor">
													<span>主办方:</span>
													<span class="sponsor_name">中国人工智能协会</span>
												</div>
												<ul class="list-inline" id="smallIcon">
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-liulanrenshu"></span> 1241</a>
													</li>
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-favorite_diss"></span> 786</a>
													</li>
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-pinglun"></span> 42</a>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="col-md-3 column">
										<div class="contest_card">
											<img src="img/activity2.jpg"/>
											<div class="contest_text">
												<div class="sponsor">
													<span>主办方:</span>
													<span class="sponsor_name">中国人工智能协会</span>
												</div>
												<ul class="list-inline" id="smallIcon">
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-liulanrenshu"></span> 8794</a>
													</li>
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-favorite_diss"></span> 988</a>
													</li>
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-pinglun"></span> 66</a>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="col-md-3 column">
										<div class="contest_card">
											<img src="img/activity3.jpg"/>
											<div class="contest_text">
												<div class="sponsor">
													<span>主办方:</span>
													<span class="sponsor_name">中国人工智能协会</span>
												</div>
												<ul class="list-inline" id="smallIcon">
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-liulanrenshu"></span> 888</a>
													</li>
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-favorite_diss"></span> 123</a>
													</li>
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-pinglun"></span> 12</a>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="col-md-3 column">
										<div class="contest_card">
											<img src="img/activity4.jpg"/>
											<div class="contest_text">
												<div class="sponsor">
													<span>主办方:</span>
													<span class="sponsor_name">中国人工智能协会</span>
												</div>
												<ul class="list-inline" id="smallIcon">
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-liulanrenshu"></span> 123</a>
													</li>
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-favorite_diss"></span> 332</a>
													</li>
													<li>
														<a href="#" style="color: darkgrey;"><span class="iconfont icon-pinglun"></span> 23</a>
													</li>
												</ul>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div><a href="contest_detail.jsp">dsds</a>
		<%@ include file="bottom.jsp" %>
		<script src="js/tuijian.js"></script>
		<script>
			/*实现随机推荐功能（效果）*/
			
			var sponsor_names = document.getElementsByClassName("sponsor_name");
			var likes = document.getElementsByClassName("likes");
			var favs = document.getElementsByClassName("favs");
			var pings = document.getElementsByClassName("pings");
			var imgs = document.getElementsByClassName("imgs");
			var ran = Math.round( Math.random()*3 );
			for(var i = 0,j = ran; i<sponsor_names.length; i++,ran++ ) {
				sponsor_names[i].innerHTML = tuijians[ran].sponsor_name;
				likes[i].innerHTML = tuijians[ran].hot;
				favs[i].innerHTML = tuijians[ran].fav;
				pings[i].innerHTML = tuijians[ran].pinglun;
				imgs[i].src = tuijians[ran].img;
			}
		</script>
	</body>
</html>
